<!--
 * @Descripttion: 
 * @version: 
 * @Author: Jun
 * @Date: 2021-05-26 14:53:29
 * @LastEditors: Jun
 * @LastEditTime: 2021-05-26 15:37:34
-->
<template>
  <div>
    <el-select v-model="value" placeholder="请选择" @change="handlerChange" :disabled="isDisabled">
      <el-option
        v-for="item in valueArray"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      >
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  props: {
    valueArray: {//数组数据
      type: Array, 
      required: true,
    },
    currentItem:{//当前选中值
        required:true
    },
    isDisabled:{
        type:Boolean,
        default:false
    }
  },
  model:{
      prop:"currentItem",
      event:"change"
  },
  data() {
    return {
      value: this.currentItem,
    };
  },
  methods:{
      handlerChange(val){
        this.$emit("change",val)
      }
  }
};
</script>

<style>
</style>